package com.uinnova.product.eam.init.schedule.job;

import com.uinnova.product.eam.service.CyAutoCreateService;
import lombok.extern.log4j.Log4j2;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.quartz.QuartzJobBean;
import org.springframework.stereotype.Component;

@Component
@Log4j2
public class CyAutoCreateJob extends QuartzJobBean {

    @Autowired
    private CyAutoCreateService cyAutoCreateService;

    @Override
    protected void executeInternal(JobExecutionContext context) throws JobExecutionException {
        log.info("自动创建系统文件夹begin---");
        cyAutoCreateService.categoryAutoCreate();
        log.info("自动创建系统文件夹end---");
    }
}
